package com.blb.proxy;

/**
 * 手机代理商
 */
public class CellphoneProxy implements CellphoneSales{

    //手机工厂的引用
    private CellphoneSales factory;

    //传入工厂对象
    public CellphoneProxy(CellphoneSales factory) {
        this.factory = factory;
    }

    @Override
    public void sell(String type) {
        //扩展被代理对象的方法
        System.out.println("给"+type+"打广告了！！！");
        factory.sell(type);
        System.out.println("给"+type+"做售后！！！！");
    }
}
